import { FC, useMemo } from 'react'
import { Tabs } from 'antd'
import type { TabsProps } from 'antd'
import TablePage from './TablePage'
import Resizable from './Resizable'
import List from './List'
import { handleTableShowDate } from '@hs-admin/utils'

const Demo: FC = () => {
  const item = {
    profit: '<0'
  }
  handleTableShowDate(item, 'profit')
  console.log('[ item ] >', item)

  const items: TabsProps['items'] = useMemo(
    () => [
      {
        key: '1',
        label: '表格和分页',
        children: <TablePage />
      },
      {
        key: '2',
        label: '拖拽宽度-tree',
        children: <Resizable />
      },
      {
        key: '3',
        label: '无限滚动',
        children: <List />
      }
    ],
    []
  )

  return <Tabs defaultActiveKey="1" items={items} />
}

export default Demo
